The present invention relates to network protocols, and particularly to acknowledgement of receipt of messages in the network protocols.
Protocols for control networks, such as the internet, are well known. One such protocol is the protocol developed by ECHELON SYSTEMS CORPORATION. Its protocol is described in U.S. Pat. No. 5,018,138. Applicant hereby incorporates this U.S. Patent by reference.
One of the basic precepts of an internet protocol is the notion of an acknowledgment service. FIG. 1 illustrates a portion of a conventional network. The network 100 comprises a plurality of subnets 102a-102c coupled to a plurality of nodes 104a-104f. Routers 106a-106b are located between subnets 102a-102c. The routers 106a-106b route messages to the appropriate subnet 102a-102c. When an originating node, such as node 104a, sends a message to a destination node, such as node 104f, the message travels from subnet 102a, through router 106a, to subnet 102b, through router 106b, to subnet 102c, and then to destination node 104f. The sequence of routers 106a-106b through which the message travels is the path of the message from the originating node 104a to the destination node 104f. 
FIG. 2 is a state diagram illustrating a conventional acknowledgement protocol. Referencing now to FIGS. 1 and 2 together, before a message is sent, an originating node 104a has an idle state 202. When the originating node 104a wishes to send a packet or message, it has a contention state 204. Once the message is sent, the originating node 104a initiates or sets a timer indicated by a state of waiting for an acknowledgment packet 206 from the destination node 104f. The time period of length of the timer is based upon assumptions concerning how long it takes to transport a message through the various elements of the network and to get a message back. This time period is dependent upon the physical media itself and how long it takes for a message to travel along this media. It is advantageous to minimize the time period as an overly long time period wastes valuable network resources. A predetermined amount of time is given for each portion of the route from a subnet to a router, called a xe2x80x9chopxe2x80x9d. Once destination node 104f receives the message, it sends an acknowledgement packet back to the originating node 104a. If the originating node 104a receives the acknowledgement packet before the timer expires, then it knows that the delivery of the message was successful. The originating node 104a returns to an idle state 202. If the destination node 104f never receives the message due to problems somewhere along the message""s path, then the originating node""s 104a timer will expire without receiving an acknowledgement packet. In this situation, originating node 104a assumes that the delivery of the message failed. It may then retry message delivery by resending the message. The protocol typically allows for a predetermined number of retries before abandoning the attempt to deliver the message. This protocol is well known in the art and will not be discussed in further detail here.
One problem which exist for this conventional protocol is that the amount of time it take to transport a message through each hop is actually dynamic and variable. The distance in each hop are variable. Some may be very long while others are very short. A message may travel through the routers at different rates, depending on the characteristics of the individual router. When the actual time for a message to be delivered is actually very long, a message may be received by a destination node but its acknowledgement packet may not be able to reach the originating node before the originating node""s timer expires. The originating node would be forced to resend the message, wasting valuable network resources.
One effect of this problem is when the originating node retries delivery of the message, the retry message may be mistakenly considered a new message under certain circumstances. For example, although the destination node can detect if duplicate message arrive, if enough time lapses, or new messages are received from other nodes, before the retry message is received, the retry message may be interpreted as a new message by the destination node. This could cause undesirable results. For example, assume that the opening and closing of doors in a water dam is accomplished through a command which toggles the state of the doors. Assume also an operator sends a command to close the water dam doors. However, this message delivery fails. The originating node then retries delivery by resending the message. Due to the problem described above, the second message is mistakenly perceived as a new message. The first message toggles the dam doors closed, while the second message toggles the dam door open again, resulting in the opposite of the desired result. In other applications, the user may receive strange behavior from the network without knowing why, since the problem is difficult, if not impossible, to trace.
Accordingly, what is needed is a method for a dynamic wait acknowledge for a network protocol. The present invention addresses this need.
The present invention is a method for acknowledgment of receipt of a message in a network, where the network includes a plurality of nodes. The method includes sending a message from a first node of the plurality of nodes destined for a second node of the plurality of nodes; setting a timer for the first node for receipt of an acknowledgment packet from the second node; determining if a wait acknowledge packet is received by the first node; and resetting the timer if the wait acknowledge packet is received by the first node. The present invention adds a wait acknowledge event to the state in the acknowledgment protocol which waits for an acknowledgement packet from the destination node. The wait acknowledge packet notifies the recipient that the message sent by the originating node has been received and forwarded. As long as the message is being properly forwarded to the next hop, wait acknowledge packets will continue to be sent to the originating node. In this manner, the amount of time the originating node waits for the acknowledgment packet from the destination node is dynamic and is dependent upon the actual length of time it takes for the message to be transmitted through the network. This method reduces waste of network resources and minimizes the problem of unintentional duplicate messages.